﻿<navigation:Page x:Class="AppLab.Views.Submit" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:local="clr-namespace:AppLab.Controls"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:data="clr-namespace:AppLab.Data.Models"
           mc:Ignorable="d"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
           d:DesignWidth="640" d:DesignHeight="480"
           d:DataContext="{d:DesignInstance Type=data:SubmitData}"      
           Style="{StaticResource PageStyle}">

    <Grid x:Name="LayoutRoot" AllowDrop="True">
        <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" >

            <StackPanel x:Name="ContentStackPanel" Style="{StaticResource ContentStackPanelStyle}">

                <!--<TextBlock x:Name="HeaderText" Style="{StaticResource HeaderTextStyle}" 
                           Text="{Binding Path=ApplicationStrings.SubmitPageTitle, Source={StaticResource ResourceWrapper}}"/>-->
                <Grid Height="40">
                    <TextBlock x:Name="ContentText" Style="{StaticResource ContentTextStyle}"  VerticalAlignment="Center"  Margin="25,0,0,0" HorizontalAlignment="Left"
                           Text="请提交客户端软件包"/>
                </Grid>
                <toolkit:BusyIndicator x:Name="busyIndicator" BusyContent="{Binding Path=ApplicationStrings.BusyIndicatorRegisteringUser, Source={StaticResource ResourceWrapper}}"
                             IsBusy="{Binding IsBusy}">
                    <local:CustomDataForm x:Name="submitForm" 
                                  CurrentItem="{Binding}"
                                  IsEnabled="{Binding IsBusy, Converter={StaticResource NotOperatorValueConverter}}"
                                  AutoEdit="True" CommandButtonsVisibility="None"
                                  AutoGeneratingField="SubmitForm_AutoGeneratingField"                                            
                                  Style="{StaticResource DataFormStyle}" HorizontalAlignment="Left" Margin="26,0,0,0" Width="400" />
                </toolkit:BusyIndicator>
                
                <Button Name="OK" HorizontalAlignment="Left" Content="提交" Margin="342,4,0,0" Width="60" IsEnabled="{Binding IsBusy, Converter={StaticResource NotOperatorValueConverter}}" Click="OK_Click" />
            </StackPanel>
        </ScrollViewer>
    </Grid>
</navigation:Page>
